a11y: Skip non-presented children when required
authorMatthias Clasen <mclasen@redhat.com>
Sat, 24 Oct 2020 15:22:09 +0000 (11:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 24 Oct 2020 15:22:09 +0000 (11:22 -0400)
Whenever we determine the index of a child, we need
to skip its non-presented siblings.

gtk/a11y/gtkatspicontext.c

index 18a1d7ff9c55a26819b3bc96038dc41b73f32199..2e838b1ef63bdbdb5b08b41dcaa8de29765df174 100644 (file)
@@ -1168,6 +1168,9 @@ gtk_at_spi_context_child_change (GtkATContext             *ctx,
            iter != NULL;
            iter = gtk_widget_get_next_sibling (iter))
         {
+          if (!gtk_accessible_should_present (GTK_ACCESSIBLE (iter)))
+            continue;
+
           if (iter == child_widget)
             break;